{include file="header.html"}
<style>
.infoTable label {
  display: block;
  height: 25px;
  line-height: 25px;
  margin-left: 5px;
  color: #444;
}
.info th {
    width: 120px;
    height: 35px; 
    height: 30px;
    line-height: 30px;
    text-align: start;
}
</style>
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.all.min.js"> </script>
<script type="text/javascript">
$(function(){
	$('#user_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            //$(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        onkeyup    : false,
        rules : {
        	sname : {
                required : true,
            },
            code : {
                required : true,
            },
            brief   : {
                required : true
            }
        },
        messages : {
        	sname : {
                required : '名称不能为空'
            },
            brief  : {
                required : '简介不能为空'
            }

        }
    });
});
</script>
<div id="rightTop">
  <p>船公司管理</p>
  <ul class="subnav">
    <li><a class="btn1" href="index.php?app=shipcompany">{$lang.manage}</a></li>
    <li>
      <!-- {if $sc.sid} -->
        <span>编辑</span>
      <!-- {else} -->
        <span>{$lang.add}</span>
      <!-- {/if} -->
    </li>
  </ul>
</div>
<div class="info">
  <form method="post" enctype="multipart/form-data" id="user_form" name="user_form">
    <table class="infoTable">
<!--     {if $sc.sid} -->
    <tr>
        <th class="paddingT15"></th>
        <td class="paddingT15 wordSpacing5"> <img src="../{$sc.logoimg}" onerror="this.src='/data/files/dlogo.png'" width="100px" />
                 </td>
      </tr>
<!--       {/if} -->
      <tr>
        <th class="paddingT15"><b style="color: #ff0000">*&nbsp;</b> 船公司名称:</th>
        <td class="paddingT15 wordSpacing5">
            <input class="sort_order" id="sname" placeholder="请填写船公司名称" type="text" name="sname" value="{$sc.sname|escape}" />
        </td>
      </tr>
      
       <tr>
        <th class="paddingT15"><b style="color: #ff0000">*&nbsp;</b> 编码:</th>
        <td class="paddingT15 wordSpacing5">
            <input class="sort_order" id="code" placeholder="请填写编码" type="text" name="code" value="{$sc.code|escape}" />
        </td>
      </tr>
      
       <tr>
        <th class="paddingT15">公司logo:</th>
        <td style="margin-top: 20px;" class="paddingT15 wordSpacing5"> <input class="infoTableFile2" type="file" name="portrait" id="portrait" />
        <br/><em style="color: #999;font-size: 14px">图片比例为1:1 推荐大小为300*300</em>
                 </td>
      </tr>
      
      <tr>
        <th class="paddingT15"> 是否启用:</th>
        <td class="paddingT15 wordSpacing5"><p>
            <label>
            <input name="isuse" type="radio" value="1" {if $sc.isuse == 1}checked="checked"{/if} />
            是</label>
            <label>
            <input type="radio" name="isuse" value="0" {if $sc.isuse == 0}checked="checked"{/if} />
            否</label>
          </p>
        </td>
      </tr>
      
      <tr>
                <th class="paddingT15">
                    排序:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="sort_order" id="sort_order" type="text" name="sort_order" value="{$sc.sort_order}" />
                </td>
            </tr>
            
            
            <tr>
                <th class="paddingT15">
                    简介:</th>
                <td class="paddingT15 wordSpacing5">
                    <textarea  style="width: 300px;height: 120px;" name="brief">{$sc.brief}</textarea>
                </td>
            </tr>
            
            <tr>
                <th class="paddingT15">
                    <label for="article">详细介绍:</label></th>
                <td class="paddingT15 wordSpacing5">                
                    <textarea id="description" name="description" style="width:650px;height:400px;">{$sc.description|escape}</textarea>
<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('description');
</script>
                </td>
            </tr>
      
      <tr>
        <th></th>
        <td class="ptb20"><input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
          <input class="formbtn" type="reset" name="Reset" value="{$lang.reset}" />        </td>
      </tr>
    </table>
  </form>
</div>
<div style="display: none"  >
    <div id="hzlist">
        <iframe id="hzframe" width="" height="600px" frameborder="0" scrolling="no"></iframe>
    </div>
</div>
<div style="display: none"  >
    <div id="oplist">
        <iframe id="opframe" width="" height="600px" frameborder="0" scrolling="no"></iframe>
    </div>
</div>
{include file="footer.html"}